package com.foreknow.elmboot.controller;

import com.foreknow.elmboot.po.Food;
import com.foreknow.elmboot.po.User;
import com.foreknow.elmboot.service.FoodService;
import com.sun.tools.corba.se.idl.constExpr.Or;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/7
 */
@RestController
@RequestMapping("/FoodController")
public class FoodController {
    @Autowired
    private FoodService foodService;

    @RequestMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(Food food){
        List<Food> foodList = foodService.listFoodByBusinessId(food.getBusinessId());
        return foodList;
    }
}
